package com.phpxiu.app.adapter;

import android.support.v4.app.Fragment;
import android.support.v4.app.FragmentManager;

import com.phpxiu.app.view.fragment.BaseFragment;
import com.phpxiu.app.view.fragment.HomeFollowFragment;
import com.phpxiu.app.view.fragment.HomeDiscoverFragment;
import com.phpxiu.app.view.fragment.HomeHotFragment;


/**
 * Created by WuJinZhou on 2016/5/5.
 */
public class HomePagerAdapter extends MFragmentPagerAdapter {
    public HomePagerAdapter(FragmentManager fm, String[] title) {
        super(fm, title);
    }

    @Override
    public Fragment getItem(int position) {
        BaseFragment fragment=null;
        switch (position){
            case 0:
                fragment= HomeFollowFragment.builder(null);
                break;
            case 1:
                fragment= HomeHotFragment.builder(null);
                break;
            case 2:
                fragment= HomeDiscoverFragment.builder(null);
                break;
            default:
                break;
        }
        return fragment;
    }
}
